Pmoo.__jsonid = 100;
Pmoo.doJson = function(url,cb,ext){
	var jsonid = Pmoo.__jsonid++;
	var jsoncp = '__pmoo__json' + jsonid;
	
	//a dummy json request
	if(url.startsWith('dummy://')){
		url = url.replace('dummy://','');
		if(url){
			var img = new Image();
			img.src = url;
			}
		try{
			cb({},ext);
			}
		catch(e){}
		return false;
		}
		
	url = url.replace('{%callback%}',jsoncp);	
	window[ jsoncp ] = function(r){
		Pmoo.mon('接受json数据:',url);	
		try{
			cb(r,ext);
			}
		catch(e){
			window[ jsoncp ] = undefined;
			try{ delete window[ jsonp ]; } catch(e){}
			throw e;
			}
		};
	Pmoo.mon('发送json请求:',url);	
	var script = document.createElement('script');
	script.type = 'text/javascript';
	script.src = url;
	var head = document.getElementsByTagName('head')[0];
	head.appendChild(script);
	};
